<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.w3.org/1999/xhtml"
>
<head>
    <title>Spring Security Example</title>
    <script th:src="@{plugins/jquery/jquery-3.3.1.min.js}" type="text/javascript"></script>
</head>
<body>
<h1>Welcome!</h1>

<p>Click <a th:href="@{/hello}">here1</a> to see a greeting.</p>
<p>Click <a th:href="@{/go}">here2</a> to see a greeting.</p>
<div sec:authorize="isAuthenticated()">
    This content is only shown to authenticated users.
</div>
<div><a href="javascript:void(0)" onclick="test()">测试拥有user角色</a></div>
<div sec:authorize-url="sys:menu:add_menu">有添加菜单权限</div>
<div sec:authorize-url="sys:menu:del_menu">无删除菜单权限</div>
</body>
<script>
    function test() {
        $.ajax({
            url: '/getUsers',
            type: 'GET',
            success: function (data) {
            },
            error: function (data) {
                console.log(data);
            }
        });
    }
</script>
</html>
